# -*- coding: utf-8 -*-
from tablestore import *
from tablestore.retry import WriteRetryPolicy

ALIYUN_ACCESS_KEY_ID = 'LTAI5peLQQ5dQ9gi'
ALIYUN_ACCESS_KEY_SECRET = 'neDmHQjhIexyRMAk4cBusOxK5iLFDe'

TABLE_STORE_LOG = 'table_store.log'


def ots_end_point():
    return 'https://straight.cn-shenzhen.ots.aliyuncs.com'


def ots_instance_name():
    return 'straight'


def create_client() -> OTSClient:
    return OTSClient(
        ots_end_point(),
        ALIYUN_ACCESS_KEY_ID,
        ALIYUN_ACCESS_KEY_SECRET,
        ots_instance_name(),
        logger_name=TABLE_STORE_LOG,
        retry_policy=WriteRetryPolicy
    )
